package com.cyf.db.mapper;

import com.cyf.db.bean.ThirdFee;
import org.apache.ibatis.annotations.*;

/**
 * 第三方上报的费用
 * Created by cage on 2017/2/9.
 */

public interface ThirdFeeMapper {

    @Insert("insert into thirdfee(id,thirdId,orderId,parkingId,plate,fee,outTime,createdTime) values(" +
            "#{thirdFee.id}, #{thirdFee.thirdId}, #{thirdFee.orderId}, #{thirdFee.parkingId}, " +
            "#{thirdFee.plate}, #{thirdFee.fee}, #{thirdFee.outTime}, #{thirdFee.createdTime})")
    @SelectKey(statement = "select LAST_INSERT_ID()", keyProperty = "thirdFee.id", before = false, resultType = int.class)
    void insertThirdFee(@Param("thirdFee") ThirdFee thirdFee);

    @Delete("delete from thirdfee where id = #{id}")
    void deleteById(@Param("id") Integer id);
}
